package com.example.mode.factoryMode.abstractFactory;

/**
 * Created with IntelliJ IDEA.
 * User: yf-wenhao
 * Date: 2019/3/26
 * Time: 下午6:02
 * 为一组相关或相互依赖的对象提供一个接口，而无需指定他们的具体类
 */
public class Test {

    public static void main(String[] args) {
        Factory factory = new WomanFactory();
        factory.createBlackHuman().color();
        factory.createWhileHuman().color();

        factory.createBlackHuman().sex();
        factory.createWhileHuman().sex();

        Factory factory1 = new ManFactory();
        factory1.createWhileHuman().color();
        factory1.createBlackHuman().color();

        factory1.createWhileHuman().sex();
        factory1.createBlackHuman().sex();

    }

}
